package com.niiwoo.civet.user.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description:
 * @Author:LiJian
 * @Date:2017/11/21
 */
@Getter
@AllArgsConstructor
public enum LibraLoanLimitEnum {
    LOAN_AGAINST_FAKE((byte) 1, "命中借款反欺诈"),
    CREDIT_AGAINST_FAKE((byte) 2, "命中授信反欺诈"),
    CREDIT_AMOUNT_LESS((byte) 3, "授信额度＜起借金额"),
    LOAN_AUDIT((byte) 4, "自动审核拒绝"),
    LOAN_ARTIFICIAL((byte) 5, "人工审核拒绝"),
    USER_CONFIRM_OVERTIME((byte) 6, "用户确认借款超时"),//退回、审核通过待确认
    ;

    private Byte limitType;
    private String limitDesc;

    public static LibraLoanLimitEnum getEnumByType(Byte type){
        for(LibraLoanLimitEnum libraLoanLimitEnum:LibraLoanLimitEnum.values()){
            if(libraLoanLimitEnum.getLimitType().equals(type)){
                return libraLoanLimitEnum;
            }
        }

        return null;
    }
}
